﻿@model IEnumerable<vngoodlife.Article>

@{
    ViewBag.Title = ViewBag.Title + vngoodlife.Util.ConstantClass._suffixTitle;
}

<div class="article">
@ViewBag.HeaderName
</div>

<div style="width:680px; border-bottom: 1px solid #ccc;"></div>
@foreach (var item in Model)
{
    <div class="articles">
        <a href="@Url.RouteUrl("ArticleDetailFrontend", new { articleSeoUrl = item.ArticleSeoUrl })">
            <img src="../../../Content/images/article/thumbnail/@item.Photo" alt="@item.Photo"/>
            <h1>@item.Title</h1></a>
            <div class="info">
                <span class="postnews">@*Bởi <a href="#">@item.MemberName</a>*@ lúc @String.Format(vngoodlife.Util.ConstantClass._partialDateTimeFormat, item.CreateDate)</span> 
                <span class="view">Lượt xem:@item.ViewNumber</span> 
                @*<span class="like">50</span>*@
            </div>
       
            <p>@item.Description</p>
    </div>
}

<!--start paging-->
@if (ViewBag.ResultType == "tag")
{
<div id="container">
    <div class="pagination">
        @if (ViewBag.Previous_Mark_Visibility)
        {
		    <a href="@Url.RouteUrl("TagsFrontend", new { tagsSeoUrl = ViewBag.TagSeoUrl, currentPage = 1 })" 
               class="page gradient" title="Trang đầu">&laquo;</a>
            <a href="@Url.RouteUrl("TagsFrontend", new { tagsSeoUrl = ViewBag.TagSeoUrl, currentPage = ViewBag.PreviousPageIndex })" 
               class="page gradient" title="Trang trước">&lsaquo;</a>
        }
        @for (int j = ViewBag.BeginPage; j <= ViewBag.EndPage; j++)
        {
            if (j == ViewBag.CurrentPage)
            {
                <a href="@Url.RouteUrl("TagsFrontend", new { tagsSeoUrl = ViewBag.TagSeoUrl, currentPage = j })" 
                   class="page active">@j</a> 
            }
            else
            {
                <a href="@Url.RouteUrl("TagsFrontend", new { tagsSeoUrl = ViewBag.TagSeoUrl, currentPage = j })" 
                   class="page gradient">@j</a>
            }
        }
        @if (ViewBag.Next_Mark_Visibility)
        {
            <a href="@Url.RouteUrl("TagsFrontend", new { tagsSeoUrl = ViewBag.TagSeoUrl, currentPage = ViewBag.NextPageIndex })" 
                class="page gradient" title="Trang kế"> &rsaquo;</a>
            <a href="@Url.RouteUrl("TagsFrontend", new { tagsSeoUrl = ViewBag.TagSeoUrl, currentPage = ViewBag.LastPage })" 
                class="page gradient" title="Trang cuối">&raquo;</a>
        }
	</div>
</div>
}


@if (ViewBag.ResultType == "sub")
{
<div id="container">
    <div class="pagination">
        @if (ViewBag.Previous_Mark_Visibility)
        {
		    <a href="@Url.RouteUrl("SubjectFrontend", new { subjectSeoUrl = ViewBag.SubjectSeoUrl, currentPage = 1 })" 
               class="page gradient" title="Trang đầu">&laquo;</a>
            <a href="@Url.RouteUrl("SubjectFrontend", new { subjectSeoUrl = ViewBag.SubjectSeoUrl, currentPage = ViewBag.PreviousPageIndex })" 
               class="page gradient" title="Trang trước">&lsaquo;</a>
        }
        @for (int j = ViewBag.BeginPage; j <= ViewBag.EndPage; j++)
        {
            if (j == ViewBag.CurrentPage)
            {
                <a href="@Url.RouteUrl("SubjectFrontend", new { subjectSeoUrl = ViewBag.SubjectSeoUrl, currentPage = j })" 
                   class="page active">@j</a> 
            }
            else
            {
                <a href="@Url.RouteUrl("SubjectFrontend", new { subjectSeoUrl = ViewBag.SubjectSeoUrl, currentPage = j })" 
                   class="page gradient">@j</a>
            }
        }
        @if (ViewBag.Next_Mark_Visibility)
        {
            <a href="@Url.RouteUrl("SubjectFrontend", new { subjectSeoUrl = ViewBag.SubjectSeoUrl, currentPage = ViewBag.NextPageIndex })" 
                class="page gradient" title="Trang kế"> &rsaquo;</a>
            <a href="@Url.RouteUrl("SubjectFrontend", new { subjectSeoUrl = ViewBag.SubjectSeoUrl, currentPage = ViewBag.LastPage })" 
                class="page gradient" title="Trang cuối">&raquo;</a>
        }
	</div>
</div>
}
<!--end paging-->

@section controlAds{
    <div style="width:100%;">
    <img src="../../../Content/Ads/cocacolaads1.jpg" alt="" style="border:0; width:300px; height:auto;"/></div>
}

@section MetaTag{

    <meta name="keywords" content="@ViewBag.MetaKeywords" />
}